"""
------------------- info ----------------------
name: xxx
age:  xxx
sex : xxx
job:  xxx
hobby: xxx
------------------- end ------------------------
"""

# a = "------------------- info ----------------------"
# b = "name:"
# c = "age:"
# d = "sex:"
# e = "job:"
# f = "hobby:"
# g = "------------------- end ------------------------"
#
# name = input('name:')
# age = input('age:')
# sex = input('sex:')
# job = input('job:')
# hobby = input('hobby:')
#
# print(a + '\n' + b + name + '\n' + c + age + '\n' + d + sex + '\n' + e + job + '\n'
#       + f + hobby + '\n' + g
#       )


# name = input("name:")
# age = input("age:")
# sex = input("sex:")
# job = input("job:")
# hobby = input("hobby:")

# print(msg%(input("name:"),input("age:"),input("sex:"),input("job:"),input("hobby:")))

# 字符串格式化的时候 不能少 不能多   （占的数量和填充的数量要一致）
# 填充的时候 内容和占的位置是要一一对应的


"""
------------------- info ----------------------
name: %s
age:  %s
sex : %s
job:  %s
hobby: %s
------------------- end ------------------------
"""

# %s ,%d, %%

# msg = '%s，学习进度5%%'
# print(msg%(input("name:")))

# %s -- 占字符串的位置
# %d -- 占整型的位置
# %% -- 转义（把占位转换成普通的%号）

# name = input("name")
# print(f"alex{name},{'aaa'}")

# f字符串拼接 -- 3.6版本及以上才能使用

msg = '''
------------------- info ----------------------
name: %s
age:  %s
sex : %s
job:  %s
hobby: %s
------------------- end ------------------------
'''

print(msg%('alex','20','nan','it','cnb'))

msg = f'''
------------------- info ----------------------
name: {input("name:")}
age:  {input("age:")}
sex : {input("sex:")}
job:  {input("job:")}
hobby: {input("hobby:")}
------------------- end ------------------------
'''
print(msg)
